derivative (x^2-2x)/(3x+1)